In [3]:
#1
y = sin(pi * x - pi) 
y.plot(-1,1, color = 'red', thickness = 2)
Out[3]:
In [5]:
#2
f = cos(pi * x - pi)
f.plot(-1,1)
Out[5]:
In [2]:
#3
g = sin(pi * x - pi)
i = cos(pi * x - pi)
plot(g, -1, 1) + plot(i, -1, 1)
Out[2]:
In [6]:
#4
e = 1 / x
e.plot(-1,1)
Out[6]:
In [14]:
#5
x, y = var('x, y')
r = (y * sin(x^2 - y^2) == x * cos(x + y))
implicit_plot(r, (x, -3, 3), (y, -3, 3))
Out[14]:
In [7]:
#6
t = var('t')
w = cos(3 * t)
ñ = cos(t + cos(3 * t))
plot(w) + plot(ñ)
Out[7]:
In [20]:
#7
x, y = var('x, y')
z = x^2 - y^2
plot3d(z, (x, -5, 5), (y, -5, 5))
Out[20]:
In [21]:
#8
x, y, z = var('x, y, z')
o = (x^2 + y^2 - z^2 == 0)
implicit_plot3d(o, (x, -5, 5), (y, -5, 5), (z, -5, 5))
Out[21]:
In [19]:
#9
x, y, z = var('x, y, z')
u = (2 * x + y + z == 1) 
o = (x^2 + y^2 - z^2 == 0)
implicit_plot3d(o, (x, -5, 5), (y, -5, 5), (z, -5, 5)) + implicit_plot3d(u, (x, -5, 5), (y, -5, 5), (z, -5, 5), color = 'red', thickness = 2)
Out[19]:
In [20]:
#10
x, y, z = var('x, y, z')
p = (x - z + 3 == 0)
h = 0.5 * x + 0.5 * y + z == 1.4
o = (x^2 + y^2 - z^2 == 0)
planop = implicit_plot3d(p, (x, -5, 5), (y, -5, 5), (z, -5, 5), color = 'green', thickness = 2)
planoh = implicit_plot3d(h, (x, -5, 5), (y, -5, 5), (z, -5, 5), color = 'purple', thickness = 2)
planoo = implicit_plot3d(o, (x, -5, 5), (y, -5, 5), (z, -5, 5))
planop + planoh + planoo
Out[20]: